<template>
    <div>
        <indextop></indextop>
        <div class="top_top" style="margin-top: 20px;margin-bottom: 20px">
            <span>欢迎--{{name}}--登录</span>
        </div>
        <div class="top">
            <div class="top_left">
                <ul class="asideNav">

                    <li><router-link to="/loginH/grzx">个人信息</router-link></li>
                    <li><router-link to="/loginH/xgmm">修改密码</router-link></li>
                    <li><router-link to="/loginH/cgx">草稿箱</router-link></li>
                    <li><router-link to="/loginH/wyfb">我要发布</router-link></li>
                </ul>
            </div>

            <div class="top_right">
                <router-view></router-view>
            </div>

        </div>

        <bottom_bottom></bottom_bottom>
    </div>
</template>

<script>
    import global from "../../components/global";
    import indextop from "../myIndex/indextop";
    import siderBarComponent from "../../components/siderBarComponent";
    import articleComponent from "../../components/articleComponent";
    import bottom_bottom from "../myIndex/bottom_bottom";

    export default {
        name: "IndexH",
        components: {
            indextop,
            siderBarComponent,
            articleComponent,
            bottom_bottom,
            global
        },
        data() {
            return {
                name: "张三",
                dat:[],
            }
        },
        created() {
            this.dat = this.$store.state.dat
            let id=window.sessionStorage.getItem('id');
            this.name=this.dat[id].Name
            // global.dat.push('admin','admin')
            // alert(JSON.stringify(global.dat))是正确的
            alert(JSON.stringify(this.$store.getters.getDat))
            // this.name=global.dat[0].yhm
        },
        mounted() {
            // alert(global.dat.yhm)
        }


    }
</script>

<style lang="less" scoped>
    .top {
        height: 750px;
        width: 1200px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
    }

    .aside {
        width: 230px;

    }

    .articleList {
        float: right;

        /deep/ .dynews {
            width: 900px;
            margin-right: 10px;

        }
    }

    .top_top {

        width: 1200px;
        margin: 0 auto;
        height: 30px;

        span {
            width: 100%;
            background-color: #d2d2d2;
            display: inline-block;
            line-height: 30px;
            float: left;
        }
    }

    .top_left{
        width:20%;
    }
    .asideNav{
        border-top: 1px solid #ccc;
        li{
            width: 100%;
            height: 62px;
            line-height: 62px;
            border-bottom: 1px solid #ccc;
            color: #1a66b3;
            font-size: 16px;
            background: url(../../assets/images/jiantouBlue.jpg) no-repeat right center;
        }
    }
    .top_right{
        width: 75%;
    }

</style>